<style type="text/css">
	.amount {
		display:none;
	}

</style>
{literal}
<script>
$(document).ready(function() {
	(function (original) {
	$.fn.clone = function () {
		var       result = original.apply (this, arguments),
			my_textareas = this.find('textarea'),
		result_textareas = result.find('textarea');

		for (var i = 0, l = my_textareas.length; i < l; ++i)
		$(result_textareas[i]).val ($(my_textareas[i]).val());

		return result;
	};
	}) ($.fn.clone);
  var count = 0;	
	$("#itemAmount").click(function() {
			
			$("#amount").find(".itemCount").attr('id', count);
			$("#amount").find(".itemDelete").attr('id', count);
			$("#amount")
						.clone()
						.removeAttr("id")
						.insertBefore("#amount")
						.attr('name', 'amount' + count)
						.attr('class', 'amount' + count)
						.prepend("<a href='#' name='amount" + count + "'></a>");
			$("#amount").find(".itemInfo").val("");
			$("#amount").find(".itemCount").val("");
			$(".index").append("<a href='#amount"+ count +"' class='link"+ count +"'><span class='text" + count + "'>{/literal}{#notitle#}{literal}</span><hr /></a>");
			count++;
	});
});

</script>
{/literal}
<div class="index" style="position:fixed; padding:5px; top:5px; background-color:#ffffff; float:right; border:1px solid #efefef; width:220px; right:10px;">
	{#rule#} <br /><br />

</div>
<form action="index.php?mod=rules&page=add" method="post" id="Form">
	<input type="hidden" value="{$id}" name="ruleID" />
	<article class="module width_full">
		<header><h3><input type="text" name="protocol_name" id="1" class="itemCount required" onchange="$('.text' + $(this).attr('id')).text($(this).val()).change()" value="" style="float:left; width:200px;"></h3></header>
			<div class="module_content">
				<div class="content">

					<div id="amount" class="amount">
						<fieldset>
						<div class="table_list">
							<input type="text" name="protocol_titel[]" class="itemCount required" onchange="$('.text' + $(this).attr('id')).text($(this).val()).change()" value="" style="float:left; width:200px;" />
						</div><br /><br />
						<div class="table_list">
							<textarea name="protocol_information[]" class="itemInfo required" id="itemInfo" rows="5"  style="font-size:12px; width:98%;"></textarea> 
						</div>
						<div style="float:left; margin-top:10px;">
							<input style="margin-left:10px;" type="button" value="{#delete#}" name="" class="itemDelete alt_btn" onclick="$('.amount' + $(this).attr('id')).remove(); $('.link' + $(this).attr('id')).remove();"/>
						</div>
						</fieldset>
					</div>		
				</div>
			</div>
		<footer>
			<div class="submit_link">					
				<input style="float:right;" type="button" name="itemAmount" class="alt_btn" value="+ {#textfield#}" id="itemAmount" />
				<a href="index.php?mod=rules"><input type="submit" value="{#submit#}" name="add_protocol" class="alt_btn"></a>
				<a href="index.php?mod=rules"><input type="submit" value="{#back#}" class="alt_btn"></a>
			</div>
		</footer>
	</article>
</form>
<!-- Addet -->
<div class="modal" id="addet">
        <h3>{#addet#}</h3>
		<p>{#success_addet#}</p>
</div>